package com.bah.tract.action;

import com.bah.tract.model.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;
import java.util.Arrays;

@Name("workStoreList")
public class WorkStoreList extends EntityQuery<WorkStore> {

	/**
	 * 
	 */
	private static final long serialVersionUID = -51331243697815243L;

	private static final String EJBQL = "select workStore from WorkStore workStore";

	private static final String[] RESTRICTIONS = {
			"lower(workStore.description) like lower(concat(#{workStoreList.workStore.description},'%'))",
			"lower(workStore.label) like lower(concat(#{workStoreList.workStore.label},'%'))",};

	private WorkStore workStore = new WorkStore();

	public WorkStoreList() {
		setEjbql(EJBQL);
		setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS));
		setMaxResults(25);
	}

	public WorkStore getWorkStore() {
		return workStore;
	}
}
